package com.boss.core.common;

import com.boss.core.common.Server;
import org.kohsuke.stapler.DataBoundConstructor;

/**
 * This class is used to handle the situation when we have multiple-target linux boxes in 'copy' task for GIS support.
 * When the user adds multiple target linux boxes in the form each of them is created as an instance
 * and while accessing the values of each 'instance' via the submitted JSON object this class is used as
 * a template in the bindJSONToList method.
 *
 * @author Momin Noor Khan
 */

public class TargetLinuxBox {
    private String task;
    private Server server;
    //private String staplerClass;
    //private String targetLocation;

    @DataBoundConstructor
    public TargetLinuxBox(String task, Server server) {
        this.task = task;
        //this.server = jsonServerBlock.getString("stapler-class");
        this.server = server;
        //this.staplerClass = Server.getString("stapler-class");
        //this.targetLocation = Server.getString("targetLocation");
    }

    /**
     * Gets the JSONObject corresponding to 'Server' block of target linux box profile.
     * @return
     */
    public Server getServer() {
        return server;
    }

    /**
     * For empty key
     */
    public String getTask() {
        return task;
    }
}

